var lastValue = "", nodeList = [], fontCss = {};
var tloadinit;
ztreeLayerIframeAjaxPostUtils = {
	doFormSubmitPost : function(postUrl,formid){
		if(validateForm.form()){
			ztreeLayerIframeAjaxPostUtils.doSubmitFormTreeInfoPost(postUrl,formid);
			return true;
		}
		return false;
	},
	doSubmitFormTreeInfoPost : function(postUrl,formid) {
		var array = {};
		var arrs = $('#' + formid).serializeArray();
		for ( var item in arrs) {
			if(arrs[item].name != 'ctime' && arrs[item].name !='texts'){
				array[arrs[item].name] = arrs[item].value;
			}
		}
		//console.log(JSON.stringify(array));
		var tload = top.layer.load(0, {
			shade : [ 0.5, '#fff' ]
		}); // 0代表加载的风格，支持0-2
		$.ajax({
			headers : {
				'Accept' : 'application/json',
				'Content-Type' : 'application/json'
			},
			type : "post",
			data : JSON.stringify(array),
			url :  postUrl,
			async : true,
			dataType : "json"
		}).done(function(data) {
			// 成功回调，
			//console.log(JSON.stringify(data));
			if (data != null) {
				top.layer.close(tload);
				$("#asyncResult").val(data.ret);
				if(data.data){
					if(data.data.id!=undefined && data.data.id>0){
						$("#asyncResultData").val(data.data.id);
					}else{
						$("#asyncResultData").val(data.data.mid);
					}
				}
				$("#asyncResultError").val(data.msg);
			}
		}).fail(function() {
			// 失败回调
			top.layer.close(tload);
			$("#asyncResult").val(-110);
		});
	},
	asyncTreeCallResult : function(){
		return $("#asyncResult").val();
	},
	asyncTreeCallResultError : function(){
		return $("#asyncResultError").val();
	},
	asyncTreeCallResultData : function(){
		return $("#asyncResultData").val();
	},
}
